﻿using NExt.Core.Model.Base;

namespace NExt.form
{
    public class ComboBox : ComboBox<ComboBoxEvents>
    {
    }

    public abstract class ComboBox<TEvents>: TriggerField<TEvents>
        where TEvents : ComboBoxEvents, new()
    {
        public bool? editable { get; set; }
        public bool? forceSelection { get; set; }
        public int? handleHeight { get; set; }
        public string itemSelector { get; set; }
        public string hiddenName { get; set; }
        public bool? lazyInit { get; set; }
        public bool? lazyRender { get; set; }
        public string listAlign { get; set; }
        public string listClass { get; set; }
        public int? listWidth { get; set; }
        public string loadingText { get; set; }
        public int? maxHeight { get; set; }
        public int? minChars { get; set; }
        public int? minListWidth { get; set; }
        public string mode { get; set; }
        public int? pageSize { get; set; }
        public int? queryDelay { get; set; }
        public string queryParam { get; set; }
        public bool? resizable { get; set; }
        public string selectedClass { get; set; }
        public string shadow { get; set; }
        public NExt.data.Store store { get; set; }
        public string title { get; set; }
        public NExt.Template tpl { get; set; }
        public object transform { get; set; }
        public string triggerAction { get; set; }
        public bool? typeAhead { get; set; }
        public int? typeAheadDelay { get; set; }
        public string valueField { get; set; }
        public string valueNotFoundText { get; set; }
    }

    public class ComboBoxEvents: TriggerFieldEvents
    {
        public IScript beforequery { get; set; }
        public IScript beforeselect { get; set; }
        public IScript collapse { get; set; }
        public IScript expand { get; set; }
        public IScript select { get; set; }
    }
}
